# 序列的操作
name_list = ["tang",123,"long","xiang"] #列表
name_tuple = ("tang",123,"long","xiang") #元组
name_str = "tang 123 long xiang"        #字符串
#切片-正序
name_step  = name_list[0:4]
print(f"切片后为：{name_step}")
name_step  = name_tuple[0:4]
print(f"切片后为：{name_step}")
name_step  = name_str[0:(len(name_str))]
print(f"切片后为：{name_step}")

#切片-正序-步长
name_step  = name_list[::2]
print(f"切片后为：{name_step}")

#切片-反序
name_step  = name_list[::-1]
print(f"倒序切片后为：{name_step}")
name_step  = name_tuple[0:4]
print(f"切片后为：{name_step}")
name_step  = name_str[0:(len(name_str))]
print(f"切片后为：{name_step}")





#切片-正序
